<?php
class Slider extends DataObject{
    private static $db = array(
        'SortOrder' => 'Int',
        'Description' => 'HTMLText'
    );
    private static $default_sort = 'SortOrder';
    private static $has_one =array(
        'Image' => 'Image',
        'HomePage' => 'HomePage'
    );

    public function getCMSFields(){
        $fields = new FieldList(array(
            new UploadField('Image','Image'),
            new HtmlEditorField('Description', 'Description')
        ));
        return $fields;
    }

    public function SummaryFields(){
        return array(
            'Image.CMSThumbnail' => 'Image'
        );
    }
}